CREATE TABLE [dbo].[Comment]
(
[Id] [int] NOT NULL,
[ReaderId] [int] NULL,
[CommentContent] [ntext] COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[IsApprove] [bit] NULL,
[BookId] [int] NULL,
[Status] [int] NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
ALTER TABLE [dbo].[Comment] ADD
CONSTRAINT [FK_Comment_Book] FOREIGN KEY ([BookId]) REFERENCES [dbo].[Book] ([Id])
GO
ALTER TABLE [dbo].[Comment] ADD CONSTRAINT [PK_Comment] PRIMARY KEY CLUSTERED  ([Id]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[Comment] ADD CONSTRAINT [FK_Comment_Reader] FOREIGN KEY ([ReaderId]) REFERENCES [dbo].[Reader] ([Id])
GO
